<template>
  <div class="main">
    <!-- 导航头部 -->
    <van-nav-bar :title="activeTitle" fixed />
    <!-- 主体区域 -->
    <keep-alive include="">
      <router-view></router-view>
    </keep-alive>
    <!-- 底部导航 -->
    <van-tabbar route>
      <van-tabbar-item to="/layout/home" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item to="/layout/search" icon="search">搜索</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  computed: {
    activeTitle: function() {
      return this.$route.meta.title;
    },
  },
};
</script>

<style scoped>
.main {
  padding-top: 46px;
  padding-bottom: 50px;
}
</style>
